package com.wdh.kjs.activity;

import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.View;
import android.widget.TextView;

import com.wdh.kjs.R;
import com.wdh.kjs.fragment.Mf_finance_Fragment;
import com.wdh.kjs.fragment.Mf_investment_Fragment;
import com.wdh.kjs.fragment.Mf_rechargewithdraw_Fragment;
import com.wdh.kjs.fragment.Money_flowing_Fragment;
import com.wdh.kjs.widget.MyTabView;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 * Created by CQH on 2016/4/21.
 */
public class MoneyFlowingActivity2 extends BaseTopActivity implements View.OnClickListener {

    private MyTabView tab_moneyflowing;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_moneyflowing);
        initTopBar("资金流水");
        initView();
    }

    public void initView(){
        tab_moneyflowing = (MyTabView)findViewById(R.id.tab_moneyflowing);
        Log.i("msg","111");

        List<Map<String, Integer>> titles = new ArrayList<>();
        Map<String, Integer> map = new HashMap<>();
        map.put("投资流水", null);
        titles.add(map);

        map = new HashMap<>();
        map.put("融资流水", null);
        titles.add(map);

        map = new HashMap<>();
        map.put("充值提现", null);
        titles.add(map);

        List<Fragment> fragments = new ArrayList<>();
        Money_flowing_Fragment InvestFragment = new Money_flowing_Fragment();
        InvestFragment.QUERY_TYPE = 0;
        fragments.add(InvestFragment);
        Money_flowing_Fragment InvestFragment1 = new Money_flowing_Fragment();
        InvestFragment1.QUERY_TYPE = 1;
        fragments.add(InvestFragment1);
        Money_flowing_Fragment InvestFragment2 = new Money_flowing_Fragment();
        InvestFragment2.QUERY_TYPE = 2;
        fragments.add(InvestFragment2);
        tab_moneyflowing.createView(titles, fragments, getSupportFragmentManager());
    }

    @Override
    public void onClick(View view) {

    }
}
